/**
 *@description CRM运营》接口
 *@author yhw
 */

import request, {CRMAPIDomain} from '../utils/request';
import qs from 'qs';

//销售
export async function saleMonth(params) {
	return request(`${CRMAPIDomain}/sales/getMonthSales?${qs.stringify(params)}`);
}
export async function saleArea(params) {
	return request(`${CRMAPIDomain}/sales/getAreasSales?${qs.stringify(params)}`);
}

//店铺效能
export async function storeVip(params) {
  return request(`${CRMAPIDomain}/store/getStoreEffect?${qs.stringify(params)}`);
}

//回柜
export async function memberBack(params) {
	return request(`${CRMAPIDomain}/back/getVipGrandBack?${qs.stringify(params)}`);
}
export async function areaMemberBack(params) {
	return request(`${CRMAPIDomain}/back/getAreasGrandBack?${qs.stringify(params)}`);
}

export async function memberActivity(params) {
	return request(`${CRMAPIDomain}/back/getVipActiveAnalyze?${qs.stringify(params)}`);
}

export async function memberCustomer(params) {
	return request(`${CRMAPIDomain}/back/getVipConsumeTimes?${qs.stringify(params)}`);
}

//会员指标
export async function monthMember(params) {
	return request(`${CRMAPIDomain}/vipTarget/getMonthVip?${qs.stringify(params)}`);
}

export async function areaMember(params) {
	return request(`${CRMAPIDomain}/vipTarget/getAreasVip?${qs.stringify(params)}`);
}

export async function memberConsume(params) {
	return request(`${CRMAPIDomain}/vipTarget/getVipConsume?${qs.stringify(params)}`);
}

export async function customerSingle(params) {
	return request(`${CRMAPIDomain}/vipTarget/getGuestPrice?${qs.stringify(params)}`);
}


//活动效益
export async function activity(params) {
	return request(`${CRMAPIDomain}/activit/getActivitBenefit?${qs.stringify(params)}`);
}

//产品
export async function product(params) {
	return request(`${CRMAPIDomain}/product/getProBigBazaar?${qs.stringify(params)}`);
}

export async function monthProduct(params) {
	return request(`${CRMAPIDomain}/product/getMonthProSmallBazaar?${qs.stringify(params)}`);
}

export async function areaProduct(params) {
	return request(`${CRMAPIDomain}/product/getAreasProSmallBazaar?${qs.stringify(params)}`);
}
export async function CurMonthPurMember(params) {
  return request(`${CRMAPIDomain}/product/getCurMonthPurMember?${qs.stringify(params)}`);
}
export async function CurMonthRepPurMember(params) {
  return request(`${CRMAPIDomain}/product/getCurMonthRepPurMember?${qs.stringify(params)}`);
}

//会员基本信息
export async function age(params) {
	return request(`${CRMAPIDomain}/vipInfo/getAgeDistribute?${qs.stringify(params)}`);
}

//月度会员招募
export async function recruitMonth(params) {
  return request(`${CRMAPIDomain}/recruit/getMonthVipRecruit?${qs.stringify(params)}`);
}
//地区会员招募
export async function AreaVipRecruit(params) {
  return request(`${CRMAPIDomain}/recruit/getAreasVipRecruit?${qs.stringify(params)}`);
}
//微信会员招募
export async function WeChatVip(params) {
  return request(`${CRMAPIDomain}/recruit/getWxRegisterVip?${qs.stringify(params)}`);
}

